package org.tgcloud.group.repository;

import org.apache.ibatis.annotations.Param;
import org.tgcloud.group.entity.SysPermissionRole;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public interface SysPermissionRoleMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(SysPermissionRole record);

    int insertSelective(SysPermissionRole record);

    SysPermissionRole selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(SysPermissionRole record);

    int updateByPrimaryKey(SysPermissionRole record);

    List<Integer> selectPowerIdByUserType(@Param("userType") Integer userType);

    List<Integer> selectPowerIdListByUserId(@Param("roleId") Integer roleId);

    List<Integer> selectPowerIdsByIds(@Param("roleId") Integer roleId);

    int updateBatchById(@Param("roleId") int roleId, @Param("list") List<Integer> isDel, @Param("status") short status);

    int insetBatch(@Param("roleId") int roleId, @Param("list") ArrayList<Integer> integers, @Param("date") Date date);

}
